<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>weblogolib.color.Color</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">

<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="weblogolib-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://code.google.com/p/weblogo/">WebLogo</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <font size="-1"><b class="breadcrumbs">
        <a href="weblogolib-module.html">Package&nbsp;weblogolib</a> ::
        <a href="weblogolib.color-module.html">Module&nbsp;color</a> ::
        Class&nbsp;Color
      </b></font></br>
    </td>
    <td><table cellpadding="0" cellspacing="0">
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="weblogolib.color.Color-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
    </table></td>
</tr></table>

<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Class Color</h2>

<hr/>

<pre class="literalblock">
Color specifications using CSS2 (Cascading Style Sheet) syntax.

http://www.w3.org/TR/REC-CSS2/syndata.html#color-units

Usage:

red = Color(255,0,0)
red = Color(1., 0., 0.)
red = Color.by_name(&quot;red&quot;)
red = Color.from_rgb(1.,0.,0.)
red = Color.from_rgb(255,0,0)
red = Color.from_hsl(0.,1., 0.5)

red = Color.from_string(&quot;red&quot;) 
red = Color.from_string(&quot;RED&quot;) 
red = Color.from_string(&quot;#F00&quot;) 
red = Color.from_string(&quot;#FF0000&quot;) 
red = Color.from_string(&quot;rgb(255, 0, 0)&quot;)
red = Color.from_string(&quot;rgb(100%, 0%, 0%)&quot;)
red = Color.from_string(&quot;hsl(0, 100%, 50%)&quot;)
</pre>
<hr/>


<!-- =========== START OF METHOD SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Method Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>red</span>,
          <span class=summary-sig-arg>green</span>,
          <span class=summary-sig-arg>blue</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__eq__"></a><span class="summary-sig"><span class="summary-sig-name">__eq__</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>other</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__repr__"></a><span class="summary-sig"><span class="summary-sig-name">__repr__</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="by_name"></a><span class="summary-sig"><span class="summary-sig-name">by_name</span>(<span class=summary-sig-arg>string</span>)</span></code>
<br />
    <i>(Static method)</i>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="from_hsl"></a><span class="summary-sig"><span class="summary-sig-name">from_hsl</span>(<span class=summary-sig-arg>cls</span>,
          <span class=summary-sig-arg>hue_angle</span>,
          <span class=summary-sig-arg>saturation</span>,
          <span class=summary-sig-arg>lightness</span>)</span></code>
<br />
    <i>(Class method)</i>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="from_rgb"></a><span class="summary-sig"><span class="summary-sig-name">from_rgb</span>(<span class=summary-sig-arg>cls</span>,
          <span class=summary-sig-arg>r</span>,
          <span class=summary-sig-arg>g</span>,
          <span class=summary-sig-arg>b</span>)</span></code>
<br />
    <i>(Class method)</i>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="from_string"></a><span class="summary-sig"><span class="summary-sig-name">from_string</span>(<span class=summary-sig-arg>cls</span>,
          <span class=summary-sig-arg>string</span>)</span></code>
<br />
    <i>(Class method)</i>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="weblogolib.color.Color-class.html#names" class="summary-sig-name"><code>names</code></a>()</span></code>
<br />
Return a list of standard color names.    <i>(Static method)</i>
</td></tr>
</table><br />


<!-- =========== START OF STATIC METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Static Method Details</th></tr>
</table>

<a name="names"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">names</span>()</span>
  </h3>
<pre class="literalblock">
Return a list of standard color names.
</pre>
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="weblogolib-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://code.google.com/p/weblogo/">WebLogo</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left"><font size="-2">Generated by Epydoc 2.1 on </font></td>
    <td align="right"><a href="http://epydoc.sourceforge.net"
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
  </tr>
</table>
</body>
</html>
